package com.shopping.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shopping.dao.IBaseDao;
import com.shopping.dao.Impl.ITopsDao;
import com.shopping.model.Tops;
import com.shopping.service.ITopsService;
@Service
public class TopServiceImpl extends BaseServiceImpl<Tops> implements ITopsService{

	@Autowired
	private ITopsDao dao;
	
	@Override
	public IBaseDao<Tops> getBaseDao() {
		return dao;
	}

	@Override
	public Tops findTopsByGoodId(Integer id) {
		return dao.selectTopsByGoodId(id);
	}

	@Override
	public Integer deleteByGoodId(Integer goodId) {
		return dao.deleteByGoodId(goodId);
	}

	@Override
	public List<Tops> findTopsByTypeId(Integer typeId) {
		return dao.selectTopsByTypeId(typeId);
	}

}
